#include <iostream>
#include <string>

using namespace std;

int main(){
    string string;
    int count;

    cout << "Input string: ";
    getline(cin, string);

    count = 0;
    for (int i = 0; i < string.size(); i++){
        if (string[i] == ' '){
            count++;
        }
    }

    cout << "Count of space in this string: " << count << endl;

    return 0;
}